package com.big.app.controller;


import com.big.app.service.intf.ZancangService;
import com.big.app.vo.R;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: zjl
 * @description
 * @date: 2022/4/20 22:55
 */
@RestController
@RequestMapping("/api/zancang/")
@Api(value = "实现点赞收藏相关操作",tags = "实现点赞收藏相关操作")
@CrossOrigin
public class ZangcangController {
  @Autowired
  private ZancangService zancangService;
  @GetMapping("detail.do")
  public R selectDetail(Integer id){
      return zancangService.selectDetail(id);
  }
  @GetMapping("addZnum.do")
  public R updateZnum(Integer mid,Integer znum,Integer zactive){
    return zancangService.updateZnum(mid,znum,zactive);
  }
  @GetMapping("addCnum.do")
  public R updateCnum(Integer mid,Integer cnum,Integer cactive){
    return zancangService.updateCnum(mid,cnum,cactive);
  }
}
